﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections;
using System.Text;

namespace XLDL
{
    public class DS_Stack:Stack
    {
        
        public DS_Stack()
        {
           
        }

        public void them(object img)
        {
            try
            {
                if (this.Count == 5)
                {
                    return;
                }

                if (this.Count == 0)
                {
                    this.Push(img);
                }
                else
                {
                    if (this.Contains(img) == false)
                    {
                        this.Push(img);
                    }
                    else
                    {
                                                
                    }
                }
            }
            catch { }
          
        }
        public string xuat()
        {
            
                StringBuilder str = new StringBuilder();
                str.Append("<table cellpadding='0' cellspacing='0' border='0px' class='his'>");
                str.Append("<tr><td valign='top' align='center' style=' background:#55BE47;'><b>Đã xem</b></td></tr>");
                object [] a = this.ToArray();
                for (int i = 0; i < a.Length; i++)
                {
                    str.Append("<tr><td valign='top'><img src='images/" + a[i].ToString() + "' width='50px' border='0px'/></td></tr>");

                }
                str.Append("</table>");

               return str.ToString();
         

        }

    }
   
}
